﻿namespace Exam.Infrastrucrure.Dto
{

    /// <summary>
    /// 返回给前台的结果集
    /// </summary>
    public class MyApiResult
    {

        /// <summary>
        /// 代码
        /// </summary>
        public ApiCode Code { get; set; }
        /// <summary>
        /// 响应信息
        /// </summary>
        public string? message { get; set; }
        /// <summary>
        /// 数据
        /// </summary>
        public object? data { get; set; }



    }

    /// <summary>
    /// 状态代码
    /// </summary>
    public enum ApiCode
    {
        /// <summary>
        /// 成功代码
        /// </summary>
        Ok = 0,
        /// <summary>
        /// 失败代码
        /// </summary>
        Fail = -1,
        /// <summary>
        /// 其他代码
        /// </summary>
        other = 1,
        /// <summary>
        /// 错误
        /// </summary>
        error = 500

    }

    /// <summary>
    /// token
    /// </summary>
    public class Token
    {
        /// <summary>
        /// token
        /// </summary>
        public string token { get; set; } = null!;
    }

    /// <summary>
    /// 
    /// </summary>
    public class MyApiResultChliren
    {
        /// <summary>
        /// 总数量
        /// </summary>
        public int? total { get; set; }
        /// <summary>
        /// 返回数据
        /// </summary>
        public object? data { get; set; }
    }
}

